
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">

<ui:composition>
	<h:form id="hub_menu_form" style="margin:0;padding:0;">
		<rich:toolbar height="35px" itemSeparator="line"
			rendered="#{loginManaged.displayApplicationToolbar}">
			<rich:toolbarGroup>
				<h:graphicImage value="../../imgs/ecr_logo_small.gif" />
			</rich:toolbarGroup>

			<rich:dropDownMenu verticalOffset="9" style="background:#637B89"
				rendered="#{loginManaged.currentUser.role.role == 'ROLE_AGENCY_CHIEF' 
				|| loginManaged.currentUser.role.role == 'ROLE_COORDINATOR'}">
				<!-- Menu de gestion pour le chef d'agence et le coordinateur. -->
				<f:facet name="label">
					<h:panelGroup>
						<h:graphicImage value="../../imgs/icons/ico_config.gif"
							styleClass="rich_drop_menu" width="20" />
						<h:outputText value="#{lbl['menu.config']}" />
					</h:panelGroup>
				</f:facet>
				<rich:menuItem label="#{lbl['menu.config.user']}"
					action="menu_manage_user"
					rendered="#{loginManaged.currentUser.role.role == 'ROLE_AGENCY_CHIEF'}" />
				<rich:menuItem label="#{lbl['menu.config.destination']}"
					action="menu_manage_destination" />
				<rich:menuItem label="#{lbl['menu.config.rail']}"
					action="menu_manage_rail" />
			</rich:dropDownMenu>

			<rich:dropDownMenu verticalOffset="9" style="background:#637B89">
				<!-- Menu de visualisation pour le hub. -->
				<f:facet name="label">
					<h:panelGroup>
						<h:graphicImage value="../../imgs/icons/ico_hub.gif"
							styleClass="rich_drop_menu" width="20" />
						<h:outputText value="#{lbl['menu.hub']}" />
					</h:panelGroup>
				</f:facet>
				<rich:menuItem label="#{lbl['menu.hub.display']}"
					action="menu_display_hub" />
				<rich:menuItem label="#{lbl['menu.hub.inputdata.file']}"
					action="menu_manage_input_data_file"
					rendered="#{loginManaged.currentUser.role.role == 'ROLE_AGENCY_CHIEF' 
				|| loginManaged.currentUser.role.role == 'ROLE_COORDINATOR'}" />
				<rich:menuItem label="#{lbl['menu.hub.inputdata.ihm.composition']}"
					action="menu_manage_input_data_ihm_composition"
					rendered="#{loginManaged.currentUser.role.role == 'ROLE_AGENCY_CHIEF' 
				|| loginManaged.currentUser.role.role == 'ROLE_COORDINATOR'}" />
				<rich:menuItem label="#{lbl['menu.hub.inputdata.ihm.sillon']}"
					action="menu_manage_input_data_ihm_sillon"
					rendered="#{loginManaged.currentUser.role.role == 'ROLE_AGENCY_CHIEF' 
				|| loginManaged.currentUser.role.role == 'ROLE_COORDINATOR'}" />
			</rich:dropDownMenu>

			<rich:dropDownMenu verticalOffset="9" style="background:#637B89"
				rendered="#{loginManaged.currentUser.role.role == 'ROLE_AGENCY_CHIEF' 
				|| loginManaged.currentUser.role.role == 'ROLE_COORDINATOR' 
				|| loginManaged.currentUser.role.role == 'ROLE_ECR_CONSULTANT'}">
				<!-- Menu de gestion des impressions. -->
				<f:facet name="label">
					<h:panelGroup>
						<h:graphicImage value="../../imgs/icons/ico_print.png"
							styleClass="rich_drop_menu" width="20" />
						<h:outputText value="#{lbl['menu.print']}" />
					</h:panelGroup>
				</f:facet>
				<rich:menuGroup label="#{lbl['menu.print.plans']}">
					<rich:menuItem label="#{lbl['menu.print.working.plan']}"
						action="menu_print_working_plan" />
					<rich:menuItem label="#{lbl['menu.print.formation.plan']}"
						action="menu_print_formation_plan" />
					<rich:menuItem label="#{lbl['menu.print.compo.plan']}"
						action="menu_print_composition_plan" />
				</rich:menuGroup>
				<rich:menuItem label="#{lbl['menu.print.planing']}"
					action="menu_print_planning" />
				<rich:menuItem label="#{lbl['menu.print.hub']}"
					action="menu_print_hub" />
				<rich:menuItem label="#{lbl['menu.print.rail']}"
					action="menu_print_rail" />
			</rich:dropDownMenu>

			<rich:dropDownMenu verticalOffset="9" style="background:#637B89"
				rendered="#{loginManaged.currentUser.role.role == 'ROLE_AGENCY_CHIEF'}">
				<!-- Menu de gestion des statistiques. -->
				<f:facet name="label">
					<h:panelGroup>
						<h:graphicImage value="../../imgs/icons/ico_stat.gif"
							styleClass="rich_drop_menu" width="20" />
						<h:outputText value="#{lbl['menu.report']}" />
					</h:panelGroup>
				</f:facet>
				<rich:menuItem label="#{lbl['menu.report.files']}"
					action="menu_report" />
			</rich:dropDownMenu>

			<rich:toolbarGroup location="right">
				<!-- Les données utilisateur. -->
				<h:outputText value="#{lbl['menu.connect.user']}" /> : 
				<h:outputText value="#{loginManaged.currentUser.firstName}" />
				<h:outputText value="#{loginManaged.currentUser.lastName}" /> [
				<h:outputText value="#{loginManaged.currentUser.role.label}" /> ]
			</rich:toolbarGroup>

			<rich:toolbarGroup location="right">
				<!-- La deconnexion utilisateur. -->
				<h:commandLink action="#{loginManaged.logindDisconnect}"
					value="#{lbl['menu.disconnect']}" styleClass="disconnect" />
			</rich:toolbarGroup>

			<rich:toolbarGroup location="right">
				<!-- La version du logiciel (on fait au plus simple...)-->
				<h:outputText value="Version 1.0" />
			</rich:toolbarGroup>
		</rich:toolbar>
	</h:form>
</ui:composition>
</html>